<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'customer.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<link rel="stylesheet" type="text/css" href="<%=basePath%>/css/biaoge.css"/>
<script type="text/javascript" src="jquery/js/jquery-1.8.2.js"></script>
<script type="text/javascript" src="js/jquery-1.7.2.js"></script>
  </head>
  <script type="text/javascript">
  /* var c=$("#chakan");
  var go=$("#gong");
  var jub=$("#jubao"); */

  
   function ju(){
    window.location="ManagerLogin.action";
  }
  function cha(){
 
   window.location="showCustomer.action";
     
  }
  
  function g(){
    window.location="showindustry.action";
  }
  
  function jiben(){
     window.location="industryinformation.action";
  }
  function add(){
    window.location="gotoindus.action";
  }
  
  function deleteindus(id){
  if(confirm("确定要删除吗？")){
   window.location="deleteindus?indusid="+id;
   }
  }
  
  function updateindus(id){
    //alert(id);
   window.location="updateindus?indusid="+id;
  }
  
  function getone(id){
  //alert(id);
     window.location="getoneindus?indusid="+id;
  }
  
  function detail(indusid){
   // alert(indusid);
    window.location="indusdetail?indusid="+indusid;
  }
  </script>
  <body> 
   
   <!-- <div style="width:900px;margin-left: 300px;margin-top:60px" id="gong"> -->
   <div  align="center">
  <table id="mytable"  border="1" cellspacing="6">
	  <tr >
		  	<td>工厂名字</td>
		  	<td>工厂地址</td>
		  	<td>工厂负责人</td>
		  	<td>电话号码</td>
		  	<td>主营业务</td>
		  	<td>工厂详细信息</td>
		  	<td>修改信息</td>
		  	<td>删除工厂</td>
	  </tr>
	   <c:forEach items="${gonglist}" var="gong"> 
	  <tr>
	  		<td>${gong.industryName}</td>
	  		<td>${gong.industryAddress}</td>  
	   		<td>${gong.industryprincipal}</td>
	   		<td>${gong.industryTelephone}</td>   
	   		<td>${gong.productName}</td>
	   		<td><input type="button" value="查看详细信息" onclick="detail('${gong.industryId}')"></td>
	   		<td><input type="button" value="修改信息" onclick="getone('${gong.industryId}')"></td>
	    	<td><input type="button" value="删除" onclick="deleteindus('${gong.industryId}')"></td>
	  <tr>
	 </c:forEach>
  </table>
  <br>
   <input type="button" value="增加工厂" onclick="add()" > 
 </div>
 
    
					
  </body>
</html>
